package com.mjk.common.ai.work.chat;


import com.mjk.common.ai.dto.AiSearchResp;
import com.mjk.common.ai.service.AiSearchRecordService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;


@RequestMapping("/ai-search-record/")
@RestController
public class SearchRecordController {

    @Resource
    private AiSearchRecordService aiSearchRecordService;


    @GetMapping(value = "/list")
    public AiSearchResp list(@RequestParam(defaultValue = "0") Long maxId, String keyword) {
        return aiSearchRecordService.listByMaxId(maxId, keyword);
    }

    @PostMapping("/del/{uuid}")
    public boolean recordDel(@PathVariable String uuid) {
        return aiSearchRecordService.softDelete(uuid);
    }
}
